home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 135
/
135.d81
/
demo code
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
4KB
|
148 lines
0 (NULL)1,0,1:(NULL):(NULL)1,0,1
1 (NULL) 4,1,1,24,14,30,14,30,46,24,46
2 (NULL)11,1,1,30,14,52,14,52,25,47,30,52,35,52,46,30,46,30,40,42,40,42,20,30,20
3 (NULL)4,2,1,59,14,65,14,65,46,59,46
4 (NULL)10,2,1,65,14,87,14,87,46,77,46,77,33,65,33,65,27,77,27,77,20,65,20
5 (NULL)8,3,1,94,14,122,14,122,20,100,20,100,27,122,27,122,33,94,33
6 (NULL)6,3,1,116,33,122,33,122,46,94,46,94,40,116,40
7 (NULL)4,4,1,129,14,157,14,157,20,129,20
8 (NULL)8,4,1,129,40,140,40,140,20,146,20,146,40,157,40,157,46,129,46
9 (NULL)8,5,1,164,14,192,14,192,20,170,20,170,40,192,40,192,46,164,46
10 (NULL)4,6,1,210,14,216,14,216,46,210,46
11 (NULL)4,6,1,199,27,227,27,227,33,199,33
12 (NULL)8,7,1,234,14,262,14,262,20,240,20,240,27,262,27,262,33,234,33
13 (NULL)6,7,1,234,40,256,40,256,33,262,33,262,46,234,46
14 (NULL)6,8,1,269,14,291,14,291,20,275,20,275,46,269,46
15 (NULL)6,8,1,291,14,297,14,297,46,275,46,275,40,291,40,291,14
16 (NULL)5,7,"[193]dds 50 [195]ommands and [198]unctions"
17 (NULL)6,8,"[212]o the [195]64 [194]asic [201]nterpreter"
18 goto21
19 rem subr clear
20 forde=1to1000:next:(NULL)4,0,2,0,100,319,100,319,199,0,199:return
21 (NULL)8,10,"[200]igh [210]es [199]raphics: plot"
22 forx=100to220
23 (NULL)1,1,x,145-40*sin(x/10)
24 next
25 :
26 gosub20:(NULL)8,10,"[159][200]igh [210]es [199]raphics: line"
27 forx=1to40
28 (NULL) 1,1,10+(NULL)(300),100+(NULL)(99),10+(NULL)(300),100+(NULL)(99)
29 next
30 :
31 gosub20:(NULL)8,10,"[156][200]igh [210]es [199]raphics: paint"
32 forx=1to15
33 a=10+(NULL)(300):b=100+(NULL)(90)
34 c=10+(NULL)(300):d=100+(NULL)(90)
35 e=10+(NULL)(300):f=100+(NULL)(90)
36 (NULL)3,x,1,a,b,c,d,e,f
37 next
38 :
39 gosub20:(NULL)8,10,"[200]igh [210]es [199]raphics: circle"
40 n=1:p=6:forx=0to14
41 (NULL) x+1,1,p,150,n
42 p=p+n*1.25:n=n+1:p=p+n*1.25+4
43 next
44 (NULL)7,1,160,300,209
45 forde=1to1000:next
46 (NULL)0
47 (NULL) 10,1,"[205][213][204][212][201][195][207][204][207][210] [199][210][193][208][200][201][195][211]"
48 k=10*(NULL)/180
49 forx=60to100
50 (NULL)2,1,x,110+40*sin((x)*k)
51 (NULL)7,2,x,110+40*sin((x+120)*k)
52 (NULL)6,3,x,110+40*sin((x+240)*k)
53 next
54 forx=1to100
55 (NULL) 1+(NULL)(14),1+(NULL)(2),(NULL)(159),(NULL)(199),(NULL)(159),(NULL)(199)
56 next
57 forx=1to40
58 a=(NULL)(159):b=(NULL)(199)
59 c=(NULL)(159):d=(NULL)(199)
60 e=(NULL)(159):f=(NULL)(199)
61 (NULL)3,1+(NULL)(14),1+(NULL)(2),a,b,c,d,e,f
62 next
63 (NULL)7,1,80,100,150
64 forx=1to40
65 (NULL)1+(NULL)(14),1+(NULL)(2),(NULL)(159),(NULL)(199),(NULL)(200)
66 next:forde=1to1000:next
67 print"[147][158] sound"
68 (NULL):forde=1to500:next
69 fory=1to3
70 forx=1to4
71 (NULL)2
72 forde=1to70:next
73 next
74 forde=1to100:next
75 next
76 forx=1to2
77 (NULL)1
78 forde=1to300:next
79 next
80 forx=1to5
81 (NULL)7
82 forde=1to400:next
83 next
84 (NULL)4
85 forde=1to2000:next
86 print"[156] ";
87 print"and sprites..."
88 forx=0to62:poke13*64+x,255:next
89 (NULL)
90 forx=0to7:(NULL)x,0,0:(NULL)x,0
91 (NULL)x,x+1
92 (NULL)x,(NULL),(NULL),(NULL),(NULL)
93 (NULL)x,12,50,159,229
94 (NULL) (NULL)x,0,0,0,0
95 (NULL)x,0,100:(NULL)x,8
96 (NULL)x,128:(NULL)x,13,0,0
97 next
98 forx=0to7:(NULL)x:forde=1to50:next
99 next
100 (NULL)(NULL)0,0,0,0,2
101 print"";tab(13);"press any key"
102 poke$c6,0
103 getk$:ifk$=""then103
104 (NULL)
105 print"[147] basic+50 also provides commands"
106 print" and functions for programming"
107 print" renumber";
108 print tab(23);"word peek()"
109 print" delete";
110 print tab(23);"high()"
111 print" merge";
112 print tab(23);"low()"
113 print" disk load";
114 print tab(23);"integer[160]rnd()"
115 print" disk save"
116 print" hex print"
117 print" word poke"
118 print"";tab(13);"press any key"
119 poke$c6,0
120 getk$:ifk$=""then120
121 print"[147] and you can use hex numbers freely."
122 print" the following are valid statements"
123 print" with basic+50 active:"
124 print" wpoke $37,$4000
125 [153]" sys $c000"
126 [153]" hprint wpeek($0314)"
127 [153]" let x = (x and $aa) or $55
128 print"";tab(13);"press any key"
129 poke$c6,0
130 getk$:ifk$=""then130
131 print"[147]"
132 (NULL)14,6,14:print"[147]"
150 print"[147]disable"
160 print"run40000
170 [153]""
180 [151]631,13:[151]632,13:[151]198,2:[128]
40000 [129]i[178]0[164]21:[151]828[170]i,8[170]i:[130]
40010 [139]dv[179]8[176]dv[177]29[176]dv[178]8[167]40030
40020 a[178][194](828):b[178][194](828[170]dv[171]8):[151]828,b:[151]828[170]dv[171]8,a
40030 a$[178]"hello connect":[129]j[178]8[164]29:i[178][194](828[170]j[171]8):[139]i[178]14[167][130]
40040 [160]2:[159]2,i,2:[160]2:[139]st[167]40060
40050 [160]15:[159]15,i,15,"r0:"[170]a$[170]"="[170]a$:[132]15,er:[160]15:[139]er[178]63[167]40070
40060 [130]:[153]"load":[151]53272,23:[151]186,8:[151]2048,0:[151]44,8:[151]44,1:[128]
40070 q$[178][199](34):[151]646,[194](53281):[153]"load":[151]53272,23
40080 [153]"loadp(NULL)2048,0:p(NULL)44,8:p(NULL)43,1:p(NULL)56,160:p(NULL)55,0:clr:l(NULL)"q$a$q$","i
40090 [153]"run:":[151]631,13:[151]632,13:[151]198,2:[128]